[ze_id].vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <script setup>
  2. import {useRouter} from "vue-router";
  3. import request from "~/utils/request";
  4. import {REQUEST} from "~/utils/request";
  5. import {user} from "~/store";
  6. const router = useRouter();
  7. const route = useRoute();
  8. const linkTo = (obj) => {
  9. router.push(obj);
  10. };
  11. let ykl_id = $ref('')
  12. let ze_id = $ref('')
  13. let detail = $ref({})
  14. let dialogVisible = $ref(false)
  15. let detailData = $ref([])
  16. function getDetail() {
  17. request({
  18. url: "/yzy/scan/alyz",
  19. data: {
  20. ze_id: ze_id
  21. },
  22. }).then((res) => {
  23. if (res.code === '1') {
  24. detail = res.data;
  25. }
  26. })
  27. }
  28. function showDetail(item) {
  29. dialogVisible = true;
  30. detailData = item.detail;
  31. }
  32. function clearZip(item) {
  33. ElMessageBox.confirm("确认执行清空操作?", "", {
  34. confirmButtonText: "确认",
  35. cancelButtonText: "取消",
  36. type: "warning",
  37. }).then(() => {
  38. request({
  39. url: "/yzy/scan/zip_clear",
  40. data: {
  41. ze_id:ze_id,
  42. user_id:item.user_id
  43. },
  44. }).then((res) => {
  45. if (res.code === "1") {
  46. ElMessage({
  47. type: "success",
  48. message: "操作成功!",
  49. });
  50. dialogVisible = false;
  51. getDetail();
  52. }
  53. });
  54. })
  55. }
  56. if (route.params.ze_id) {
  57. ze_id = route.params.ze_id;
  58. ykl_id = route.params.ykl_id;
  59. getDetail();
  60. }
  61. </script>
  62. <template>
  63. <NavHeader/>
  64. <bread-crumb/>
  65. <div class="w-1200px m-auto">
  66. <div class="relative -mt-40px flex justify-end">
  67. <button type="button" class="back-btn" @click="linkTo({name:'step-id',params:{id:ykl_id}})">返回</button>
  68. </div>
  69. <div class="mt-10px w-full bg-hex-fff min-h-700px py-20px px-15px">
  70. <h3 class="text-18px">试卷名称:{{ detail.ze_name }}</h3>
  71. <h4 class="mt-25px text-18px text-hex-0148E5">扫描上传压缩包情况:{{detail.zip_num}} / {{detail.total}}</h4>
  72. <div class="mt-25px" v-if="detail.list.length > 0">
  73. <table class="data-table" cellpadding="0" cellspacing="0">
  74. <tr>
  75. <th>上传考点名称</th>
  76. <th>最近更新时间</th>
  77. <th>上传压缩包数量</th>
  78. <th>上传详情</th>
  79. </tr>
  80. <tr v-for="item in detail.list">
  81. <td>{{item.sm_name}}</td>
  82. <td>{{item.last_time}}</td>
  83. <td>{{item.zip_num}}</td>
  84. <td>
  85. <button type="button" class="op-btn" @click="showDetail(item)">查看</button>
  86. </td>
  87. </tr>
  88. </table>
  89. </div>
  90. <div class="mt-25px no-data" v-else>
  91. <div>
  92. <h3 class="no-data-img"></h3>
  93. <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <commonFooter/>
  99. <el-dialog v-model="dialogVisible" title="上传详情"
  100. width="650px"
  101. custom-class="dialogTrick"
  102. append-to-body>
  103. <div class="w-full max-h-600px overflow-auto">
  104. <table class="data-table" cellpadding="0" cellspacing="0">
  105. <tr>
  106. <th>姓名</th>
  107. <th>账号</th>
  108. <th>上传份数</th>
  109. <th>操作</th>
  110. </tr>
  111. <tr v-for="item in detailData">
  112. <td>{{item.realname}}</td>
  113. <td>{{item.username}}</td>
  114. <td>{{item.zip_num}}</td>
  115. <td>
  116. <button type="button" class="op-btn" @click="clearZip(item)">清空压缩包</button>
  117. </td>
  118. </tr>
  119. </table>
  120. </div>
  121. </el-dialog>
  122. </template>
  123. <route lang="json">
  124. {
  125. "meta":{
  126. "title":"压缩包上传情况",
  127. "breadcrumb":true
  128. }
  129. }
  130. </route>
  131. <style scoped lang="scss">
  132. $color: #0048e5;
  133. .data-table {
  134. width: 100%;
  135. table-layout: fixed;
  136. tr:nth-child(even) {
  137. background: #F1F7FF;
  138. }
  139. th {
  140. height: 74px;
  141. background: $color;
  142. font-weight: normal;
  143. text-align: center;
  144. font-size: 16px;
  145. color: #fff;
  146. &:first-child{
  147. border-radius: 6px 0 0 0;
  148. }
  149. &:last-child{
  150. border-radius: 0 6px 0 0;
  151. }
  152. }
  153. td {
  154. padding: 15px 0;
  155. font-size: 16px;
  156. color: #474747;
  157. text-align: center;
  158. }
  159. }
  160. .no-data {
  161. width: 100%;
  162. height: 450px;
  163. display: flex;
  164. justify-content: center;
  165. align-items: center;
  166. .no-data-img {
  167. width: 233px;
  168. height: 199px;
  169. background: url("/images/no-data.png") center no-repeat;
  170. }
  171. }
  172. .op-btn {
  173. height: 30px;
  174. background: #fff;
  175. border: 1px solid #003eee;
  176. padding: 0 10px;
  177. border-radius: 2px;
  178. font-size: 14px;
  179. color: #003eee;
  180. text-align: center;
  181. &:disabled{
  182. background: #ccc;
  183. border-color: #ccc;
  184. color: #fff;
  185. pointer-events: none;
  186. }
  187. }
  188. </style>